FlasK MPEG

by Alberto Vigatá


Warning:
  The author declines any responsability from the use of this program. This software can not be used with copyrighted material because doing so, would infringe many laws all around the world.
   The author doesn't intend to promote piracy by any means, and the scope of the application is limited to video processing tasks with home made digital video material.
Important notice:
  The authors of FlasKMPEG have come across a program called 'FlasKMPEG DeCSS'.
  We want to express very clearly that such program or any other derived from the original is no way related with the official 'FlasKMPEG' project in any way. FlasKMPEG sources are available under the GPL license and it's totally out of our responsibility the legal implications caused by the modifications or variations from other developers performed over our code. The original FlasKMPEG can't and won't read files from encrypted DVDs, and even then, copyrighted material should not be processed with FlasKMPEG.

Index
A. Changes Log
0. Requirements
1. Introduction
2. Installation
3. Using Instructions

         3.1. Configuring Output
4. FAQ
5. Acknowledgements
6. Contact Info

Readme

A.Changes Log

       This is the first version that includes full audio support. That is, the program now decodes AC3 streams but still lacks MPEG1 audio decoding.

        So, if the input stream doesn't have an AC3 stream (or FlasKMPEG can't detect it) the only audio processing mode will be 'Direct stream copy'.

        The credits for the AC3 decoder go to Aaron Holtzman with his free AC3 decoder ,http://ess.engr.uvic.ca/~aholtzma/ac3/. To know new tips&tricks of the program go to the FAQ section.

0.Requirements

1.Introduction
    1.1 What this program does?
    The FlasK MPEG Encoder takes MPEG2 and MPEG1 program streams (video streams are currently not supported) and encodes them into another format, trying to achieve the maximum possible quality and trying to minimize the conversion impact providing a straightfordward aproach to the MPEG1/2 to MPEG/AVI conversion.
     FlasKMPEG uses 'plugins' to support output formats making that way the program more flexible, and having a wide variety of output options.

    1.2 How do you achieve High Quality Conversion? How does it work?
    A common problem when converting one video format in another is that the source and destination frame sizes doesn't match. Then you have to resize the source into the destination size using some kind of video interpolation. In many cases this process is very rude and introduces a lot or artifacts and aliasing.
    The FlasK MPEG plugs the MPEG2 decoder output right into its internal resizing motor and outputs that to the output plugin giving thus high quality conversions hard to achieve with other methods.
    The MPEG2/MPEG1 decoder is based on the MSSG (Mpeg Software Simulation Group) work an has been seamlessly embedded into Flask MPEG.  

2.Installation instructions

    General procedure
      The program is packaged into a self-extracting executable that will deploy the contents of the program into the desired folder. Just execute the package and choose a destination directory.
      To install a plugin just copy it into the program's folder and rename it to whatever_you_want.cm.flask. FlasKMPEGpeasopeich.dll can still be used for compatibility reasons. That means that you can name a plugin everything you want, but in order to be detected, it must have the termination *.cm.flask (standing for 'compiler module for flask')

       When FlasKMPEG starts up it will detect all the available and CORRECTLY INSTALLED plugins. All the detected plugins will be listed in the select output format menu. The most likely reason for a plugin not being detected on startup is an incorrect installation. Please, follow the instructions below for specific plugin installation.

     Specific installations

   This plugin will allow you to export MPEG1 files from FlasKMPEG. You don't need to have Premiere to install the plugin and use it.

    1.- Create a folder for the program and place the program inside that folder.
    2.- Install the Panasonic plugin and write down the place where the plugin will lay in. The installation program will ask for it, and if you have Premiere installed it will point to the Premiere plugin directory, if not you have to tell the installer the folder you want to place the plugin.
    3.- Once the installer is over, you have to copy the plugin into the FlasKMPEG.exe folder. The original name of the plugin should be something like "cm-mpeg-pwi2.0e.prm" although this may vary between versions.
    4.-If you've successfully found and copied the plugin into FlasK MPEG folder you have to rename it to:
                FlasKMPEGpeasopeich.dll or panplug.cm.flask
    5.-That's it, the program should run now without a problem

  This plugin will allow you to export MPEG1 and MPEG2 files from FlasKMPEG. You will need to have Adobe Premiere to install the plugin.

    1.- Create a folder for the program and place the program inside that folder.
    2.- Install the LSX-MPEG plugin and write down the place where the Adobe Premiere's plugin folder is located.
    3.- Once the installer is over, you have to copy the plugin into the FlasKMPEG.exe folder. The original name of the plugin should be something like "cm-lsx.prm" although this may vary between versions.
    4.-If you've successfully found and copied the plugin into FlasK MPEG folder you have to rename it to:
                lsxmpeg.cm.flask
    5.-That's it, the program should detect now the plugin without a problem

        *WARNING*
        The original package of FlasK MPEG encoder doesn't include neither the Panasonic plugin nor LSX one because they are commercial products. If you received a package with the plugin included you're not dealing with the original distribution.
 

    AVI output and MPEG output through bbMPEG (MPEG1, MPEG2, VCD & SVCD) are supported right off the box.

3.-     Using Instructions


       
Using FlasK MPEG
        Using FlasK MPEG is easy. To convert a file the first you have to do is open the file with File->Open File for file based operations or File->Open DVD for working with DVD structures.

        File based operation mode:
        When you open a file FlasK MPEG will try to detect whether the input file is a MPEG1 or MPEG2 program stream. If the input stream contains more than one audio or video track a selection dialog will appear. It should look something like this:


     Just click the tracks you want to work with by clicking over them.
   
A cool option of FlasK MPEG is file based DVD mode. If you've got a DVD structure somewhere in your HD or you've made a home made DVD, FlasK MPEG will see that structure as whole rather than a set of files.
      Using it is simple. Open the first file of a DVD title (the ones with names like vts_xx_1.vob and FlasK MPEG will try to find the subsequent files. If success you should see a report window like this:

    Opening other file than vts_xx_1.vob won't activate DVD mode because DVD video information is shared between the vob files. Opening a vob file that it's not the first in the title will result in an unexpected behaviour from crashing of the program to green flashing frames due to the dependency between vob files.

        DVD operation mode:
        In order to make FlasKMPEG work in DVD mode you need to have a DVD structure with all the set of files (*.ifo and *.vob files). Every *.ifo file in a DVD structure represents a DVD TITLE SET; within FlasKMPEG you open DVD TITLE SET files, that is *.ifo file.
        Pick up the ifo file you want and open it. FlasK MPEG will analize its contents in search for available Program Chains, Audio streams and subpicture streams. If everything goes well a dialog like this should appear:


      The duration in 'DVD titles' section can give you an idea of the piece of material you're interseted in. Having repeated titles with the same duration it's normal and it could mean that the DVD is using some kind of multiangle feature or the DVD is branched.
      Select the DVD subpictures and audio streams you want. If you don't want subpictures, deselect all of them.

      After opening the file, it's highly recommended that you inspect the input stream using the FlasK MPEG player (Run...->Player) to know if everything is on place.

        The FlasK MPEG Player
      You can use the player for whatever you want, but the it was thought for two purposes.
      It allows you inspecting the input video file right before encoding it, including resizing, cropping, letterboxing and aspect ratio corrections. When in DVDmode it will help you to see if files are concatenated correctly. From 0.45 version, the program tries to detect the real framerate inside the stream given that some MPEG2 progressive streams have the display rate set to 29.97fps even when they are internally progressive at 23.976.
      Another important point is that the conversion will start from the point where you seeked the player the last time.

       

        Configuration Options
          
If you succesfully opened a stream you should be able to open the configurations dialog (Options->Global project options).
      The window is divided in a series of tabs: video, audio, post processing, files and general that are explained below.
       Video tab

      Let's see the options:

     Audio Tab

     Post Processing Tab

   Using post processing you can achieve optimal results when processing your files.

 Files Tab

 General Tab

     The Output Pad

     The output pad is an useful tool that allow you to easily select all the cropping, frame size and letterboxing settings looking previewing the settings all the time.
       To understand how these settings are related take a look at the logical path the video flows inside FlasKMPEG.

VIDEO OUTPUT ---> RESIZER ---> CROPPING ---> LETTERBOXING

    Now, let's take a look at the output pad:



   To enable cropping check crop, and to enable letterboxing check letterbox.
   When you crop an image you discard some parts of it. The image you crop in FlasK MPEG is the one that is output by the resizer. You can scale the video and crop then the result. The cropped image is always smaller than the resized.
   To change the output of the resizer adjust the 'Output Size' controls. If 'crop' is not checked, you will se the window scale at the same time you adjust the contronls. If crop is enabled, you still can adjust the output size, but this time the size of the window will be determined by the 'width' and 'height' controls of the crop pad.
   To understand cropping, take a look at the following scheme:

Resized image or original image

       width x height
Top Offset
Cropped image

crop width x crop height

Left Offset

     Ajusting 'Top offset' and 'Left offset' you can move the crop window through the resized or original image. 'Crop width' and 'Crop height' you can select the window to crop (and the actual final frame size) and 'width' and 'height' is the size of the original or resized image.
     Pressing 'Reset Settings' will reset the settings disabling crop, disabling letterbox and restoring the original image size.
     Letterbox is simple, adjust the amount of black bars you want to add at left, right, top and bottom of the image.

3.1 Configuring Output

      In this section we will talk about how to configure the output plugins included in the released pack.

4. FAQ

        4.1 Hey Boy. This program is painfully slooow. Is it normal?
        It is :-( This program is free, that is, you don't pay for its use. Although the MSSG decoder offers excellent quality it is terribly slow. Notice that the program decodes a MPEG2 stream, resizes the video with bilinear and bicubic flters... From 0.49 MMX has been included in the program and it's expected that performance will increase in future releases.

        4.2 Is FlaskMPEG a DVD ripper?
            FlasK MPEG IS NOT a DVD ripper. FlasK MPEG was thought mainly for file based MPEG1 and MPEG2 conversions.

        4.3 Yeah, sure. How do you explain DVD mode and that DVD support?
            FlasK MPEG has some support when you are dealing with DVD file structures. However the program CAN'T read files from encrypted DVD discs, and even if you've got an unencrypted DVD discs you should check first if the disc has copyrights, and what the publisher let you do with that disc.
            There is no need to say that you shouldn't use this program with copyrighted material.

        4.4 I'm trying to open a DVD file right off from a DVD I just rent. It says something like the format is not supported...
            Please read point 4.3. I'm pretty sure that the DVD you just rent is copyrighted and has strict using conditions, that doesn't include copying even a single frame from it.
            When trying to open files from an encrypted DVD, the usual behaviour is FlasK MPEG not recognizing the format of the file.

        4.4 Your program sucks big time. It crashes all the time!
           I didn't force you even to try it, and obviously the program is not bug free. Check out the known bug list to see if you are in one of those situations and if there is/will be any workaround or fix soon.

        4.5 (nº1 FAQ) You afirm that the program does MMX but the MMX enabling option is disabled. What's wrong with my computer? Is it broken?

              It seems that this is the first time you're reading the docs. The program uses MMX if your computer has the MMX instruction set. What you're are telling me is the MMX iDCT option that simply was disabled because it wasn't working correctly in my tests. It will be back in future releases, but I would like you to point out that the iDCT is just a part of the whole process, and MMXizing it will speed up things just a little bit.

        4.6 AVI output is not available as an output format. What can I do?

              Upgrade your MFC library (mfc42.dll) to a newer version. The AVI output plugin requires that, and if it is not there it won't start up.


        4.7 (nº2 FAQ) I'm opening a file named vts_01_02.vob and DVDmode doesn't turn on. What am I doing wrong? Besides, green or purple frames appear at the beginning of the file.

               You're not doing anything wrong. DVD files are dependent between them, and those green and purple frames appear because the information to decode them is in the previous file you have not opened. Open the first file in the title and everything will look OK.

        4.8 (nº3 FAQ) Could you add a suspend and resume option?
               
No, I can't add a suspend and resume option because Adobe Premiere's plugins doesn't support that option.
            If your project is gonna take a big amount of time to be finished I would suggest you to encode the thing in parts. You can program FlasKMPEG to compile a specified number of seconds or frames.
By example: if you want to put a 30 minute video into two 15 minutes output files, first program FlaskMPEG to compile 15 minutes from the start and for the second file, seek the player to minute 15 and compile 15 minutes more from there.
            I know the thing is a bit tricky but it is likely to be improved in next releases.

        4.9 Installing your program screw up my Windows9x multimedia playback system. You must tell me how to uninstall it. Your program is shit.
               
Curiously enough, FlasKMPEG hasn't a setup. Delete FlasKMPEG files, and FlasKMPEG will be gone. There is no way that FlasKMPEG can screw up Windows playback in any way because FlasKMPEG is a standalone application and don't even uses DirectShow architechture. Do you want your money back? Sorry, you did not pay nothing for it!!


FAQ Comments:

    I'm receiving an incredible amount of messages asking me for legal software. Please, if you're not happy with the current FREE AVI and MPEG output of FlasKMPEG you can purchase at very reasonable prices the plugins for Premiere that are indicated above. They're commercial products and usually they are faster and offer better quality.
    Equally annoying is receiving messages asking me help for copying a DVD. I don't know how to copy a DVD and then I can't explain it to you. OK?
   

5. Acknowledgments
    To Mr. Avery Lee , creator or VirtualDub for that incredible app, and for his help with the resizing stuff.
    To Nemesis for all the Icon designs
    To MPEG2AVI author for the MMX iDCT
    To DVD2MPG creator for his help with the premiere plugin stuff.
    To Aaron Holtzman for his free source AC3 decoder
    To the MSSG (MPEG Software Simulation Group) for that magnifient decoder
    To all the translators that made internationalization possible
    To Benjy for his help with the Web Site
    To Brent Beyeler for bbMPEG
    To AGRABBER for the AVI output plugin
    To Glenn & Remco for his help with the Subpicture Stuff
    To all those people that in one way or another contributed to the creation of this program.
 

6. Contact Info
    For suggestions and bugs reach me at:
           ultraflask@yahoo.com

home page: http://go.to/flaskmpeg